package ca.ubc.icapture.genapha.forms;

import ca.ubc.icapture.genapha.beans.SNPInfo;
import icapture.SQLMgr;
import icapture.beans.DB.Cohort;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;


/**
 * Created by IntelliJ IDEA.
 * User: btripp
 * Date: Sep 13, 2006
 * Time: 9:39:33 AM
 * To change this template use File | Settings | File Templates.
 */
public class SnpListForm extends ActionForm
{

    private ArrayList<SNPInfo> snpList;
    private ArrayList<Cohort> cohortList;
    private String geneID;
    private String submitType;

    public SnpListForm()
    {
        super();
        cohortList = SQLMgr.getCohorts();
    }

    @Override
    public void reset(ActionMapping mapping, HttpServletRequest request)
    {
        submitType = null;
        geneID = null;
    }

    /**
     * 
     * @return 
     */
    public ArrayList<SNPInfo> getSnpList()
    {
        return snpList;
    }

    /**
     * 
     * @param snpList 
     */
    public void setSnpList(ArrayList<SNPInfo> snpList)
    {
        this.snpList = snpList;
    }

    /**
     * 
     * @return 
     */
    public String getGeneID()
    {
        return geneID;
    }

    /**
     * 
     * @param geneID 
     */
    public void setGeneID(String geneID)
    {
        this.geneID = geneID;
    }

    /**
     * 
     * @return 
     */
    public ArrayList<Cohort> getCohortList()
    {
        return cohortList;
    }

    /**
     * 
     * @param cohortList 
     */
    public void setCohortList(ArrayList<Cohort> cohortList)
    {
        this.cohortList = cohortList;
    }

    /**
     * 
     * @return 
     */
    public int getCohortListSize()
    {
        return getCohortList().size();
    }

    /**
     * 
     * @return 
     */
    public String getSubmitType()
    {
        return submitType;
    }

    /**
     * 
     * @param submitType 
     */
    public void setSubmitType(String submitType)
    {
        this.submitType = submitType;
    }
}
